<?php
class Auth_model extends CI_Model{
	public function __construct()
	{
		$ses = $this->session->userdata('admin');
		// redirect to login page if not login
		// make sure put login page to exclude
		if(empty($ses) && $this->router->fetch_class() != 'login'){
			header('location:'.SITE_URL.'/login/index');
			die;
		}
	}
}